<!--_meta 作为公共模版分离出去-->
<include file='public/_meta'>
<!--/meta 作为公共模版分离出去-->

<title>添加记录</title>
<meta name="keywords" content="">
<meta name="description" content="">
<style type="text/css">
	.ac_results li.ac_over{
		/*background:#d5deff;*/
	}
</style>
</head>
<body>
<article class="page-container">
	<form action="{:url('index/terminal/add')}" method="post" class="form form-horizontal" id="form-member-add" enctype="multipart/form-data">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>卡号:</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="" id="search_text" name="cardcode">
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>卡序列号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder=""  name="sim_id">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>智能设备号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="" placeholder="" name="equipment_id">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">
				<span class="c-red">*</span>
				车机厂商：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<span class="select-box" style="width:150px;">
                    <select class="select" name="supplier_no" size="1">
                       <option value="">请选择</option>
                       <option value="1376920002">赛卡(博鹭途)</option>
                       <option value="1376920001">唯特讯</option>
                       <option value="1376920003">赛卡(IOT)</option>
                    </select>
                </span>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去-->
<include file='public/_footer'>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/autocomplete/jquery.autocomplete.js"></script>
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});

	$("#form-member-add").validate({
		rules:{
			equipment_id:{
				required:true,
			},
			cardcode:{
				required:true,
			},
			sim_id:{
				required:true,
			}
			
		},
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			$(form).ajaxSubmit({
				success: function(data) { 
				 	var index = parent.layer.getFrameIndex(window.name);
					// parent.$('.btn-refresh').click();
	                if(data['code']==1){
	                
	                	layer.msg(data['msg'], {icon:6,time:1000},function(){

							parent.location.href = '{:url('index/terminal/index')}';              		
							parent.layer.close(index);
	                	});

	                }else if(data['code'] == 3){
	                	layer.msg(data['msg'], {icon:6,time:1000},function(){

							parent.location.href = '{:url('index/terminal/index')}';              		
							parent.layer.close(index);
	                	});
	                }else{
	                	layer.msg(data['msg']);

	            	}
            	}
			});
		}
	});
});

</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>